home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / bignum.exe / BIGNUM.DOC < prev    next >
Text File  |  1990-03-22  |  11KB  |  227 lines

  1.                                     BIGNUM.TPU 
  2.                                         &
  3.                                    BIG_RPN.EXE 
  4.                                Copyright 1989,1990 
  5.                                        by: 
  6.                                Stephen A. Theberge 
  7.                                  76 Wheaton Drive
  8.                                Attleboro, MA  02703
  9.                                   (508)226-0447
  10.  
  11.                           CIS (Compuserve) # 73030,3644
  12.                             GEnie Address: S.THEBERGE
  13.              
  14.  
  15.                                All rights reserved. 
  16.  
  17.             PLEASE READ BIGNUM.DOC & BIGNUM.LIC FILES BEFORE RUNNING THESE
  18.             PROGRAMS. 
  19.  
  20.                    Registration: $39.95 (check or money order). 
  21.              
  22.                                    Version 2.01 
  23.                            03/21/90 (Testing finished). 
  24.  
  25.             The  following  *.tpu  files   were   compiled   with  Borland 
  26.        International's Turbo Pascal v.  5.0 and 5.5.     It is designed to  
  27.        be  used as a unit to be accessed by other Turbo Pascal v  5.0   or  
  28.        5.5    programs.   If  you are using Turbo Pascal v   5.0,   rename  
  29.        BIGNUM.5     to BIGNUM.TPU,   or if you are  using Turbo Pascal  v. 
  30.        5.5,  rename *.55  to *.tpu.     These  units were compiled  on  an 
  31.        IBM  PC/XT  (8088).   With   your  registration,    you   get   the  
  32.        complete   source   code (BIGNUM.PAS)  allowing compilation on  any 
  33.        system.   You also get the source code for BIG_RPN.EXE, This is the 
  34.        complete  menu driven system for saving and retrieving formula  and 
  35.        variable values to be accessed by the BIGNUM string math library. 
  36.  
  37.  
  38.                                       FILES 
  39.  
  40.             BIGNUM.5,  255  digit accuracy string mathematics  library for 
  41.        Turbo Pascal v. 5.0. 
  42.  
  43.             BIGNUM.55,   255 digit accuracy string mathematics library for 
  44.        Turbo Pascal v. 5.5. 
  45.  
  46.        
  47.             Odds.pas, odds calculator showing BIGNUM (R)'s accuracy. 
  48.  
  49.             BIGNUM.LIC, licensing agreement for BIGNUM.* files. 
  50.  
  51.             BIG_RPN.EXE, stand alone program for saving, retrieving and 
  52.        evaluating mathematical formulas in up to 255 decimal digits.
  53.  
  54.                     
  55.  
  56.                                      Part 1. 
  57.                            BIG_RPN.EXE (For all users). 
  58.  
  59.             BIG_RPN.EXE  is the complete compiled menu driven system.   If 
  60.        you are not a programmer or are not interested in how the libraries 
  61.        are used, than read Part 1.   If you intend to write programs using 
  62.        the functions in the BIGNUM (R) library, than skip to part 2.
  63.             
  64.             "So,"   you  ask,   "why do I need a menu  driven  program  to 
  65.        evaluate formulas, save and retrieve formula and variable values?"
  66.             
  67.             The  answer  is  ease of use.   Also,   the  accuracy  of  the 
  68.        variables in these formulas are 255 floating point digits.  You are 
  69.        not restricted to know if the number is an integer or a real.    It 
  70.        doesn't matter.   Just enter the numbers freehand in menu option 1.  
  71.        Don't worry about scientific notation for now.  That will come in a 
  72.        later version.
  73.             
  74.                                   VALID NUMBERS 
  75.               
  76.             All floating point numbers are valid:  1.234,  99.555, -777.9, 
  77.        etc.  Integers are also valid:  999999999999999, -1, etc.   Just be 
  78.        sure not to enter numbers like:  1E+09,  1..39  or 1dd,  etc.   The 
  79.        program doesn't allow you to do this anyway,  but you still have to 
  80.        watch out for --1, -000.5, 9..3, 55.-, etc.
  81.             
  82.                                      FORMULAS 
  83.  
  84.             Any  math formula like (a+b)*(c/d)  is acceptable.   You  have 
  85.        letters A-H to chose from.  You have 8 formulas to enter into.  See 
  86.        main menu option 2.   No numbers like (1+3/3) are accepted,  as you 
  87.        can enter the values for them (A,B,C,D,E,F,G,H) in menu option 1.
  88.             
  89.                                       NOTE: 
  90.           +, addition:        a+b, 'a' added to 'b'. 
  91.           -, subtraction:     a-b, subtract 'b' from 'a'. 
  92.           *, multiplication:  a*b, multiply 'a' by 'b'.
  93.           /, division:        a/b, divide   'a' bye 'b'.
  94.           !, factorial:       a!,  a factorial. (a+b)! ('a' plus 'b')
  95.                                                 factorial.
  96.  
  97.           ², square:          a²,  a squared, square a, or a*a.
  98.           ½, root:            √a,  square root of a or a½ (a to the 1/2).
  99.  
  100.             In menu option 2, to enter !, ² and ½:
  101.             
  102.             ! is shift key and number 1.
  103.  
  104.             ² is obtained by the letter 'S', pressing the letter 'S' in 
  105.        menu option 2 gives the symbol ².
  106.  
  107.             ½ is obtained by the letter 'R', pressing the letter 'R' in 
  108.        menu option 2 gives the symbol ½.
  109.  
  110.  
  111.                               SAVE & RETRIEVE VALUES
  112.  
  113.             Don't forget to save your variables and formulas! (Option 4 of 
  114.        main menu).  Give the DOS file nume you want when prompted. Any 
  115.        valid DOS name will do here.  Menu option 3 allows you to retrieve 
  116.        your old or previously saved values.
  117.  
  118.  
  119.                                 WHEN YOU ARE 'BAD'
  120.  
  121.             Evaluate the formulas you have defined in menu option 5.  You 
  122.        get the INFIX (normal formula) RPN (hence BIG_RPN) which is the way 
  123.        compilers, calculators and BIGNUM evaluates the formula, BIGNUM 
  124.        FORMAT (How you might program the formula into a BIGNUM program), 
  125.        RPN evaluation (or the answer you want) and length of bignum 
  126.        string, or how many digits the answer is.  If you are only 
  127.        interested in the numerical value, look at RPN EVALUATION=.
  128.  
  129.             If you see 'bad', then you may not have, 1, defined a 
  130.        variable, defined a formula or there may simply be overflow like 
  131.        with a calculator.  Other strange errors can occur.  Try entering a 
  132.        formula with unbalanced parentheses or no operators.
  133.  
  134.              
  135.                          TWO TIER REGISTRATION OF BIGNUM
  136.  
  137.             Choice 1: $39.95.  Source code for BIG_RPN.EXE and BIGNUM.TPU.  
  138.                                Technical support.  One free upgrade of the
  139.                                source code.
  140.             
  141.             Choice 2: $15.00.  Technical support for BIG_RPN.EXE ONLY.  
  142.                                One free upgrade of BIG_RPN.EXE. 
  143.  
  144.  
  145.  
  146.                                      Part 2.   
  147.                                    PROGRAMMERS
  148.             BIGNUM.TPU (BIGNUM (R) library in Turbo Pascal Programs).
  149.             
  150.             The  user  or programmer has seven mathematical  functions  to 
  151.        chose from.  These are and take the form: 
  152.             
  153.             1. x := plus(s1,s2,checked); {string addition} 
  154.             2. x := minus(s1,s2,checked);{string subtraction} 
  155.             3. x := times(s1,s2,checked);{string multiplication} 
  156.             4. x := divide(s1,s2,checked,no_decimals);{string division} 
  157.             5. x := square(s1);{string, square a number} 
  158.             6. x := fac(s1);{string factorial--very useful! a little slow} 
  159.             7.   x  :=  root(s1);{string square  root---important!   takes 
  160.        approximately 75 seconds to calculate on an 8088 at 8 Mhz. 
  161.             
  162.  
  163.             The variables x,  s1 and s2  are Pascal string type variables.  
  164.        All the function can accept either a value or variable reference as 
  165.        their   arguments.    Checked  and  no_decimals  are  boolean  type 
  166.        variables  and  all the functions that use them can  be  either  by 
  167.        variable name or constants. 
  168.             It is recommended that the variable "checked"  be set to FALSE  
  169.        at  the beginning of any program that will use them unless you  are 
  170.        sure  the data s1  and s2  falls in the set of real numbers.    The 
  171.        variable no_decimals should